package com.heima.controller;

import com.heima.model.user.dtos.FollowDto;
import com.heima.model.vos.Result;
import com.heima.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author itheima
 * @since 2023-01-11
 */
@RestController
@RequestMapping("/api/v1/user")
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("user_follow")
    public Result test(@RequestBody FollowDto dto) {
        return Result.success(userService.userFollow(dto));
    }

}
